class Cat:
    def diaoyu(self):
        print('去钓鱼')
    def pashu(self):
        print('爬树')

Tom = Cat()
Tom.name = 'Tom'
Tom.diaoyu()
Tom.pashu()
print(Tom)